/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ghanaroutes.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author User
 */
@Entity
@Table(name = "viewedProfiles")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ViewedProfiles.findAll", query = "SELECT v FROM ViewedProfiles v"),
    @NamedQuery(name = "ViewedProfiles.findByViewId", query = "SELECT v FROM ViewedProfiles v WHERE v.viewId = :viewId"),
    @NamedQuery(name = "ViewedProfiles.findByViewerId", query = "SELECT v FROM ViewedProfiles v WHERE v.viewerId = :viewerId"),
    @NamedQuery(name = "ViewedProfiles.findByViewedId", query = "SELECT v FROM ViewedProfiles v WHERE v.viewedId = :viewedId"),
    @NamedQuery(name = "ViewedProfiles.findByDateViewed", query = "SELECT v FROM ViewedProfiles v WHERE v.dateViewed = :dateViewed")})
public class ViewedProfiles implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "viewId")
    private Integer viewId;
    @Column(name = "viewerId")
    private Integer viewerId;
    @Size(max = 50)
    @Column(name = "viewedId")
    private String viewedId;
    @Column(name = "dateViewed")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateViewed;

    public ViewedProfiles() {
    }

    public ViewedProfiles(Integer viewId) {
        this.viewId = viewId;
    }

    public ViewedProfiles(Integer viewId, Date dateViewed) {
        this.viewId = viewId;
        this.dateViewed = dateViewed;
    }

    public Integer getViewId() {
        return viewId;
    }

    public void setViewId(Integer viewId) {
        this.viewId = viewId;
    }

    public Integer getViewerId() {
        return viewerId;
    }

    public void setViewerId(Integer viewerId) {
        this.viewerId = viewerId;
    }

    public String getViewedId() {
        return viewedId;
    }

    public void setViewedId(String viewedId) {
        this.viewedId = viewedId;
    }

    public Date getDateViewed() {
        return dateViewed;
    }

    public void setDateViewed(Date dateViewed) {
        this.dateViewed = dateViewed;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (viewId != null ? viewId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ViewedProfiles)) {
            return false;
        }
        ViewedProfiles other = (ViewedProfiles) object;
        if ((this.viewId == null && other.viewId != null) || (this.viewId != null && !this.viewId.equals(other.viewId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ghanaroutes.entities.ViewedProfiles[ viewId=" + viewId + " ]";
    }
    
}
